home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GETDATE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  307 b   |  13 lines

  1. /* getdate.c --- p. 603 */
  2. #include <stdio.h>
  3. #include <dos.h>
  4. char *months[] = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN",
  5.         "JUL", "AUG", "SEP","OCT","NOV", "DEC"};
  6. main()
  7. {
  8.     struct date date;
  9.     getdate(&date);
  10.     printf("Date: %d %s %d\n", date.da_day,
  11.         months[date.da_mon-1], date.da_year);
  12. }
  13.